package info.wangyuan.agent.common.Enum;

import lombok.AllArgsConstructor;

import java.util.Set;

/**
 * @author Albert
 * @since 2025-08-29 01:52:12
 */
@AllArgsConstructor
public enum RagDocSyncOcrEnum {

    /**
     * pdf策略
     */
    PDF(Set.of("PDF"), "ragDocSyncOcr-PDF"),

    /**
     * word策略
     */
    DOCX(Set.of("DOC", "DOCX", "PPT", "PPTX", "XLS", "XLSX"), "ragDocSyncOcr-WORD"),

    /**
     * 纯文本策略
     */
    TXT(Set.of("TXT", "HTML", "MD"), "ragDocSyncOcr-TXT");

    private final Set<String> value;
    private final String label;

    public static String getLabelByValue(String label) {
        for (RagDocSyncOcrEnum enumValue : RagDocSyncOcrEnum.values()) {
            if (enumValue.value.contains(label)) {
                return enumValue.label;
            }
        }
        return null;
    }

}
